number = input()
s = 0
for i in number:
    b = int(i)
    s += b
print(s)